using System;
using System.Collections.Generic;
using System.Text;
using CodePlex.SpaceBlock.FS;

namespace CodePlex.SpaceBlock.Tasks
{
    public class GenericS3Download : GenericS3Base
    {

        new public class Properties : CodePlex.SpaceBlock.Tasks.GenericS3Base.Properties
        {
            public static readonly string SourcePath = "SourcePath";
        }

        protected override void InternalExecute(S3FileSystem fileSystem)
        {
            LocalFileSystem destFS = new LocalFileSystem();

            Path sourcePath = Path.Parse(this.GetTrimmed(Properties.SourcePath, true));

            Path destPath = destFS.FromLocalPath(this.GetTrimmed(Properties.DestinationPath, true));

            this.InternalTransfer(fileSystem, destFS, sourcePath, destPath,null);

            this.LogInfo("Download complete.");

        }

       
    }
}
